Feature: Check items available to add to shopping cart
Description: As user I want to check if I could add to shopping cart any searched item.
File name: amazon_test.feature
Relative path: features/amazon_test.feature
Scenario Outline: Perform a seach for iPhone 14 PRO and add it to the shopping cart
Before
Hook
00:00:00.006
And
I click on search button
00:00:04.578
And
I see the description and add the item to shopping cart
0s
// With Callbacks
And (/^I see the description and add the item to shopping cart$/, (callback) => {
// Write code here that turns the phrase above into concrete actions
callback(null, 'pending');
});
// With Promises
And (/^I see the description and add the item to shopping cart$/, () => {
// Write code here that turns the phrase above into concrete actions
return Promise.resolve('pending');
});
Then
I see the confirmation message
0s
And
I see the cart items count is "1"
0s
Scenario Outline: Perform a seach for QA Automation book and add it to the shopping cart
Before
Hook
0s
And
I click on search button
00:00:02.162
And
I see the description and add the item to shopping cart
0s
// With Callbacks
And (/^I see the description and add the item to shopping cart$/, (callback) => {
// Write code here that turns the phrase above into concrete actions
callback(null, 'pending');
});
// With Promises
And (/^I see the description and add the item to shopping cart$/, () => {
// Write code here that turns the phrase above into concrete actions
return Promise.resolve('pending');
});
Then
I see the confirmation message
0s
And
I see the cart items count is "2"
0s